{	Problem: http://codeforces.ru/problemset/problem/25/A
	Verdict: Accepted

}
var n,i,x,o,od:longint; a,b:array[1..101] of longint;
begin
readln(n);
o:=0;
od:=0;
for i:=1 to n do begin
  read(x);
  if odd(x) then begin
    inc(o);
    a[o]:=i;
  end else begin
    inc(od);
    b[od]:=i;
  end;
end;
if o=1 then writeln(a[1]) else writeln(b[1]);
end.